<template>
  <el-dialog :visible.sync="open" @close="close" :title="title" width="400px">
    <el-form ref="elForm" :model="formData" size="small" label-width="100px" label-position="left">
      <el-row :gutter="15">
        <el-col :span="24">
          <el-form-item label="指标项" prop="modelName">
            {{ formData.modelName }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="15">
        <el-col :span="12">
          <el-form-item label="打分" prop="dept">
            <el-input v-model="formData.modelScore" placeholder="0" :style="{ width: '100%' }"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer">
      <el-button @click="close">取消</el-button>
      <el-button type="primary" @click="handleConfirm">确定</el-button>
    </div>
  </el-dialog>
</template>
<script>
import dialogMixin from "@/mixins/dialogMixin";

export default {
  name: "HandleReportScoreDialog",
  mixins: [dialogMixin],
  components: {},
  props: [],
  data() {
    return {
      formData: {},
      targetModelId: 0,
      title: "编辑指标项分数",
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    edit(targetModelId, data) {
      this.formData = Object.assign({}, data);
      this.targetModelId = targetModelId;
      this.open = true;
    },
    handleConfirm() {
      this.$emit("handleOk", this.formData, this.targetModelId);
      this.open = false;
    },
  },
};
</script>
<style></style>
